<?php

namespace app\index\model;

use think\Model;

class AlbumAudioLogo extends Model
{
    protected $name = 'car_album_log'; //表名      默认类型
    protected $autoWriteTimestamp = true;
    // 定义时间戳字段名
    protected $dateFormat = 'Y/m/d H:i:s';
    protected $createTime = 'create_at';
    protected $updateTime = 'update_at';

    public function info() {
        return $this->hasOne(Album::class, 'id', 'albumId');
    }

    public function musicInfo() {
        return $this->hasOne(AlbumAudio::class, 'id', 'audioId');
    }
}